using Ayatta.Contract.Domain;

namespace Web.Base.Security
{
    public class Identity
    {
        public int Id { get; set; }
        public string Guid { get; set; }
        public string NickName { get; set; }
        public UserRole Role { get; set; }
        public UserLevel Level { get; set; }
        public UserPermission Permission { get; set; }

        public Identity():this(0,string.Empty,UserRole.None)
        {
        }

        public Identity(int id, string nickName, UserRole role): this(id, nickName, role, UserLevel.None, UserPermission.None)
        {
            Id = id;
            NickName = nickName;
            Role = role;
        }

        public Identity(int id, string nickName, UserRole role, UserLevel level, UserPermission permission)
        {
            Id = id;
            NickName = nickName;
            Role = role;
            Level = level;
            Permission = permission;
        }
    }
}